<template>
    <div>
      <a-modal 
        v-model:visible="visible" 
        title="历史记录" 
        @ok="handleOk"
        okText="提交"
        cancelText="取消"
        :width="700"
      >
        <div>
            <a-row>
                    <a-col :span="3" class="bold-black">专业名称：</a-col>
                    <a-col :span="5">电力专业</a-col>
                    <a-col :span="3" class="bold-black">科室名称：</a-col>
                    <a-col :span="5">{{ data[0].updateUser }}</a-col>
            </a-row>
        </div>
        <div>
            <a-table :dataSource="data" :columns="columns" :pagination="{pageSize:5}">
            </a-table>
        </div>
      </a-modal>
    </div>
  </template>
  <script setup>
  import { ref, watchEffect } from 'vue';
  import request from '@/utils/request';
    const data=ref([])
    const props=defineProps(['historyList'])
    watchEffect(()=>{
        // console.log(props.historyList)
        data.value=props.historyList
    })
    
    const columns=ref([
        {
            title: '修改人',
            dataIndex: 'updateUser',
            key: 'updateUser',
            align:'center'
        },
        {
            title: '修改时间',
            dataIndex: 'updateTime',
            key: 'updateTime',
            align:'center'
        },
        {
            title: '修改数量',
            dataIndex: 'count',
            key: 'count',
            align:'center'
        },
    ])
    const visible = ref(false);
    const showModal = () => {
        visible.value = true;

    };
    const handleOk = e => {
        // console.log(e);
        // const result = request({
        //     url:'/api/quota/selQuotaLog',
        //     method:'post',
        //     data:{

        //     }
        // })
        visible.value = false;
    };
    defineExpose({
        showModal
    })
  </script>